package com.amt.olcacon.mapper;

import com.amt.olcacon.entity.TblProcessEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 流程表 Mapper 接口
 */
@Mapper
public interface TblProcessesMapper extends BaseMapper<TblProcessEntity> {

    // 自定义查询方法示例
    @Select("SELECT * FROM tbl_processes WHERE NAME LIKE CONCAT('%', #{name}, '%')")
    List<TblProcessEntity> selectByName(String name);

    // 根据分类查询
    @Select("SELECT id FROM tbl_processes WHERE F_CATEGORY = 10086")
    List<Long> selectByCategory();

    // 根据引用ID查询
    TblProcessEntity selectByRefId(String refId);
}